<%-- 
    Document   : BajaTemasVotos
    Created on : 04-may-2010, 22:10:27
    Author     : Andres
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html:html lang="true">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Baja de Temas</title>
         <style type="text/css">
          body {
                background-color: #000000;
                font-family: Arial, Helvetica, sans-serif, "Arial Narrow";
                font-weight: bold;
                color: #FFFFFF;
                font-size: 14px;
        }
        </style>
        <html:base/>
    </head>
    <body>
        <% if (request.getSession().getAttribute("Tipo")!="Admin")
         {
      %>
         <jsp:forward page="Welcome.do"/>
      <%
          }
      %>
        <jsp:include page="Cabezal.html"/>
        <br>
        <table width="100%">
            <tr>
                <td width="30%" valign="top">
                    <jsp:include page="AdministradorMenu.jsp"/>
                </td>

                <td>
                    <center><h1>ELIMINAR TEMAS INEXISTENTES Y SUS VOTOS</h1></center>

                    <jsp:useBean id="listados" scope="session" class="com.actions.BajaTemasVotos" />

                    <table align="center" width="100%" style="color:black; font-size:16px">
                        <tr style="color:white; background-image:url(imagenes/botonnegro.jpg)">
                            <td align="center">
                                <b>ID</b>
                            </td>
                            <td align="center" >
                                <b>Interprete</b>
                            </td>
                             <td align="center">
                                <b>Cancion</b>
                            </td>
                            <td></td>
                        </tr>

                  <%
                    
                    int largo = listados.obtenerLista(); 
                    for (int i=0; i<largo; i++)
                    {
                        if (i%2==0)
                           {
                             %>
                         <tr style="background-image:url(imagenes/botonrojo.jpg)" >
                             <%
                           }
                            else
                            {
                             %>
                         <tr style="background-image:url(imagenes/fondo1.jpg)">
                             <%
                            }
                             %>

                             <td width="18%" align="center">
                                <%= listados.darPosicion(i,0)%>
                            </td>
                            <td width="30%" align="center">
                                 <%= listados.darPosicion(i,1) %>
                            </td>
                            <td align="center" width="40%">
                                 <%= listados.darPosicion(i,2) %>
                            </td>

                            <td valign="middle" width="12%" align="center">
                                <html:form action="/BajaTemasVotosAction.do" >
                                <html:hidden   property="idtema" value="<%= listados.darPosicion(i,0)%>"/>
                                <html:submit value="Eliminar" style=" background-color:#FF3333; font-weight:bold" />


                                </html:form>
                            </td>
                        </tr>
                    <%
                    }
                    %>

              </table>
        </table>
        <jsp:include page="Pie.html"/>

    </body>
</html:html>
